clc;
clear;

V = [0.125, 0;
    0.250, 0];

gauss_points_ref = [-0.9681602395076260898355762, -0.8360311073266357942994298, -0.6133714327005903973087020, -0.3242534234038089290385380, 0, 0.3242534234038089290385380, 0.6133714327005903973087020, 0.8360311073266357942994298, 0.9681602395076260898355762];
gauss_weights_ref = [0.0812743883615744119718922, 0.1806481606948574040584720, 0.2606106964029354623187429, 0.3123470770400028400686304, 0.3302393550012597631645251, 0.3123470770400028400686304, 0.2606106964029354623187429, 0.1806481606948574040584720, 0.0812743883615744119718922];


AB = (V(2,:) - V(1,:))';
weights = 0.5 * norm(AB) * gauss_weights_ref;

points = [V(1,1)+0.5*(gauss_points_ref+1)*(V(2,1)-V(1,1));
    V(1,2)+0.5*(gauss_points_ref+1)*(V(2,2)-V(1,2))]'


points = (V(1,:)' + 0.5 * AB .* (gauss_points_ref + 1))'


